package cn.me.alphamq.broker.event.model.nameserver;

import cn.me.alphamq.common.event.model.Event;
import io.netty.channel.ChannelHandlerContext;

/**
 * 从 broker 更换主 broker 的事件
 *
 * @author f
 */
public class ChangeMasterEvent extends Event {

    /**
     * 新主 broker 的地址
     */
    private String newMasterAddress;

    public ChangeMasterEvent(ChannelHandlerContext ctx, String newMasterAddress) {
        super.setCtx(ctx);
        this.newMasterAddress = newMasterAddress;
    }

    public String getNewMasterAddress() {
        return newMasterAddress;
    }

    public void setNewMasterAddress(String newMasterAddress) {
        this.newMasterAddress = newMasterAddress;
    }
}
